home *** CD-ROM | disk | FTP | other *** search
/ The Complete Utilities To…ka 501 Killer Utilities! / 501 Killer Utilities! (Macworld July 1995).cdr / Programming / OutOfPhase1.1 Source / OutOfPhase Folder / WaveTableOscControl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-10  |  3.4 KB  |  97 lines  |  [TEXT/KAHL]

  1. /* WaveTableOscControl.h */
  2.  
  3. #ifndef Included_WaveTableOscControl_h
  4. #define Included_WaveTableOscControl_h
  5.  
  6. /* WaveTableOscControl module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* FastFixedPoint */
  12. /* FixedPoint */
  13. /* Memory */
  14. /* EnvelopeState */
  15. /* SampleConsts */
  16. /* LFOGenerator */
  17. /* Multisampler */
  18. /* OscillatorSpecifier */
  19. /* Envelope */
  20. /* LFOListSpecifier */
  21. /* FastModulation */
  22. /* 64BitMath */
  23. /* ErrorDaemon */
  24.  
  25. #include "FixedPoint.h"
  26.  
  27. struct WaveTableTemplateRec;
  28. typedef struct WaveTableTemplateRec WaveTableTemplateRec;
  29.  
  30. struct WaveTableStateRec;
  31. typedef struct WaveTableStateRec WaveTableStateRec;
  32.  
  33. /* forwards */
  34. struct OscillatorRec;
  35. struct ArrayRec;
  36. struct ErrorDaemonRec;
  37.  
  38. /* get rid of all cached memory for state or template records */
  39. void                                    FlushWaveTableOscControl(void);
  40.  
  41. /* perform one envelope update cycle */
  42. void                                    UpdateWaveTableEnvelopes(WaveTableStateRec* State);
  43.  
  44. /* dispose of the wave table state record */
  45. void                                    DisposeWaveTableState(WaveTableStateRec* State);
  46.  
  47. /* dispose of the wave table information template */
  48. void                                    DisposeWaveTableTemplate(WaveTableTemplateRec* Template);
  49.  
  50. /* create a new wave table template */
  51. WaveTableTemplateRec*    NewWaveTableTemplate(struct OscillatorRec* Oscillator,
  52.                                                 float EnvelopeTicksPerSecond, long SamplingRate,
  53.                                                 MyBoolean Stereo, MyBoolean TimeInterp, MyBoolean WaveInterp,
  54.                                                 struct ErrorDaemonRec* ErrorDaemon);
  55.  
  56. /* create a new wave table state object. */
  57. WaveTableStateRec*        NewWaveTableState(WaveTableTemplateRec* Template,
  58.                                                 float FreqForMultisampling, float Accent1, float Accent2,
  59.                                                 float Accent3, float Accent4, float Loudness, float HurryUp,
  60.                                                 long* PreOriginTimeOut, float StereoPosition,
  61.                                                 float InitialFrequency, float PitchDisplacementDepthLimit,
  62.                                                 float PitchDisplacementRateLimit,
  63.                                                 long PitchDisplacementStartPoint);
  64.  
  65. /* fix up pre-origin time for the wave table state object */
  66. void                                    FixUpWaveTableStatePreOrigin(WaveTableStateRec* State,
  67.                                                 long ActualPreOrigin);
  68.  
  69. /* set a new frequency for a wave table state object.  used for portamento */
  70. /* and modulation of frequency (vibrato) */
  71. void                                    WaveTableStateNewFrequency(WaveTableStateRec* State,
  72.                                                 float NewFrequencyHertz);
  73.  
  74. /* send a key-up signal to one of the oscillators */
  75. void                                    WaveTableKeyUpSustain1(WaveTableStateRec* State);
  76. void                                    WaveTableKeyUpSustain2(WaveTableStateRec* State);
  77. void                                    WaveTableKeyUpSustain3(WaveTableStateRec* State);
  78.  
  79. /* restart a wave table oscillator.  this is used for tie continuations */
  80. void                                    RestartWaveTableState(WaveTableStateRec* State,
  81.                                                 float NewFreqMultisampling, float NewAccent1, float NewAccent2,
  82.                                                 float NewAccent3, float NewAccent4, float NewLoudness,
  83.                                                 float NewHurryUp, MyBoolean RetriggerEnvelopes,
  84.                                                 float NewStereoPosition, float NewInitialFrequency,
  85.                                                 float PitchDisplacementDepthLimit,
  86.                                                 float PitchDisplacementRateLimit,
  87.                                                 long PitchDisplacementStartPoint);
  88.  
  89. /* generate a sequence of samples (called for each envelope clock) */
  90. void                                    WaveTableGenSamples(WaveTableStateRec* State,
  91.                                                 long SampleCount, largefixedsigned* RawBuffer);
  92.  
  93. /* find out if the wave table oscillator has finished */
  94. MyBoolean                            WaveTableIsItFinished(WaveTableStateRec* State);
  95.  
  96. #endif
  97.